package com.yenlien.traceyun.control.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @Date 2023/11/1
 * @Author jiaLong
 * @Descript
 */
@Entity
@Table(name = "t_fruit_article")
public class Article extends BaseEntity {

    @ApiModelProperty(value = "序号", example = "1")
    private Integer sort;

    @ApiModelProperty(value = "所属内容: 新闻首页/政策分析/名企名品/专业知识/违规曝光/行业资讯/产品召回", example = "专业知识")
    private String type;


    @ApiModelProperty(value = "发布人", example = "张三")
    private String publisher;

    @ApiModelProperty(value = "发布时间", example = "2023-09-26 13:15:15")
    private String publishTime;


    @ApiModelProperty(value = "是否是热点文章", example = "true")
    private Boolean hotspot;

    @ApiModelProperty(value = "是否首页展示(首页最新果园资讯)", example = "false")
    private Boolean homeShow;


    @ApiModelProperty(value = "文章富文本内容", example = "<p>这是标题</p>")
    @Column(columnDefinition = "longtext")
    private String content;


    @Column(columnDefinition = "text")
    @ApiModelProperty(value = "文章简介", example = "")
    private String introduce;


    @ApiModelProperty(value = "文章封面", example = "**.png")
    private String img;


//    @ApiModelProperty(value = "发布后的限定查看起始时间， 格式: yyyy-MM-dd HH:mm:ss")
//    private LocalDateTime publishTimeStart;
//
//    @ApiModelProperty(value = "发布后的限定查看结束时间， 格式: yyyy-MM-dd HH:mm:ss")
//    private LocalDateTime publishTimeEnd;


//    @ApiModelProperty(value = "1=及时发布, 2=限定时间发布(该情况需要填写 publishTime )")
//    private String timely;







    @ApiModelProperty(value = "文章状态: 1=未发布(草稿), 2=已发布", example = "1")
    private String state;


    @ApiModelProperty(value = "企业ID")
    private String companyId;

    @ApiModelProperty(value = "点击量")
    private Integer viewNum;


    @ApiModelProperty(value = "上次编辑时间")
    private String lastUpdateTime;


    @ApiModelProperty(value = "文章标题")
    private String title;


    @ApiModelProperty(value = "创建时间")
    private String createTime;


    @Transient
    private Integer pageNum;






    @Transient
    private String pageType;



    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getPageType() {
        return pageType;
    }

    public void setPageType(String pageType) {
        this.pageType = pageType;
    }

    public String getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(String publishTime) {
        this.publishTime = publishTime;
    }

    public String getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(String lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }



    public Integer getViewNum() {
        return viewNum;
    }

    public void setViewNum(Integer viewNum) {
        this.viewNum = viewNum;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Boolean getHotspot() {
        return hotspot;
    }

    public void setHotspot(Boolean hotspot) {
        this.hotspot = hotspot;
    }

    public Boolean getHomeShow() {
        return homeShow;
    }


    public void setHomeShow(Boolean homeShow) {
        this.homeShow = homeShow;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }



    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Article() {
    }


//    public LocalDateTime getPublishTimeStart() {
//        return publishTimeStart;
//    }
//
//    public void setPublishTimeStart(LocalDateTime publishTimeStart) {
//        this.publishTimeStart = publishTimeStart;
//    }
//
//    public LocalDateTime getPublishTimeEnd() {
//        return publishTimeEnd;
//    }
//
//    public void setPublishTimeEnd(LocalDateTime publishTimeEnd) {
//        this.publishTimeEnd = publishTimeEnd;
//    }
//
//    public String getTimely() {
//        return timely;
//    }
//
//    public void setTimely(String timely) {
//        this.timely = timely;
//    }
}
